Publish RSS feeds to GitHub Pages #2385
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '30 5,17 * * *' | |
workflow_dispatch: | |
env: | |
CI: true | |
jobs: | |
publish-feeds: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/[email protected] | |
- uses: microsoft/[email protected] | |
- run: npx playwright install | |
- run: 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 }} |