-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.23 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
name: Publish RSS feeds to GitHub Pages
on:
push:
branches:
- main
schedule:
- cron: '00 * * * *'
workflow_dispatch:
env:
CI: true
jobs:
publish-feeds:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2.3.4
- 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 $GITHUB_ACTOR@users.noreply.github.com
git remote add gh-pages-remote https://x-access-token:$GITHUB_TOKEN@github.com/$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 }}