forked from Vinnl/feeds
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.35 KB
/
pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish RSS feeds to GitHub Pages
on:
push:
branches:
- main
schedule:
# * is a special character in YAML so you have to quote this string
# Run every day at 5:30 and 17:30:
- cron: '0 6,9,11,16 * * *'
workflow_dispatch:
env:
CI: true
jobs:
publish-feeds:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- uses: actions/[email protected]
- uses: microsoft/playwright-github-action@v1
- run: npx playwright install firefox
# GitHub Actions unfortunately does not support retries;
# this is a cumbersome method of retrying twice in case of errors:
- run: npx feed-me-up-scotty || npx feed-me-up-scotty || npx feed-me-up-scotty
- name: Deploy to GitHub Pages
run: |
git config user.name $GITHUB_ACTOR
git config user.email [email protected]
git remote add gh-pages-remote https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git
git fetch --no-recurse-submodules
git worktree add ./gh-pages gh-pages
cd gh-pages
git rm -r .
cp -r ../public/. .
git add .
git commit --message="Deploying to GitHub Pages from $GITHUB_SHA"
git push gh-pages-remote gh-pages:gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}