update_gh_pages #517
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
# This workflow does the below: | |
# - updates the master branch (github pages) | |
# Is triggred: | |
# - by a dispatch event to run this workflow (generated from the master branch push of website repo) | |
name: publish | |
on: | |
repository_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: 'master' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- run: | | |
git config user.name "${{ secrets.USER_NAME }}" | |
git config user.email "${{ secrets.USER_EMAIL }}" | |
git clone -b master "https://${{ secrets.USER_PAT }}@github.com/act-rules/act-rules-web" | |
cp -r act-rules-web/* . | |
rm -rf act-rules-web/ | |
git add -fA | |
git commit --allow-empty -m "chore: update website" | |
git push -u origin master |