Skip to content

generate-site

generate-site #22

Workflow file for this run

name: generate-site
on:
schedule:
- cron: '0 20 * * 1'
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
container:
image: ghcr.io/coatl-dev/brew:3.6.21
options: --user root
steps:
- uses: actions/checkout@v4
- run: |
brew tap coatl-dev/coatl-dev
- run: |
./script/generate.rb
- uses: actions/upload-artifact@v3
with:
name: site
path: |
${{ github.workspace }}
!.git/
!.github/
create-pr:
runs-on: ubuntu-latest
needs: generate
steps:
- uses: actions/checkout@v4
- run: |
rm -r _data
rm -r api
rm -r formula
rm -r formula-core
- uses: actions/download-artifact@v3
with:
name: site
- run: |
./script/find-replace.sh
- uses: coatl-dev/actions/simple-git-diff@coatl
id: git-diff
- if: ${{ steps.git-diff.outputs.diff == 'true' }}
uses: coatl-dev/actions/gpg-import@coatl
with:
passphrase: ${{ secrets.COATL_BOT_GPG_PASSPHRASE }}
private-key: ${{ secrets.COATL_BOT_GPG_PRIVATE_KEY }}
- if: ${{ steps.git-diff.outputs.diff == 'true' }}
run: |
git checkout -B coatl-bot-docs-autoupdate
git add --all
git commit -m "docs: update docs"
git push --force --set-upstream origin coatl-bot-docs-autoupdate
- if: ${{ steps.git-diff.outputs.diff == 'true' }}
uses: coatl-dev/actions/create-pr@coatl
with:
gh-token: ${{ secrets.COATL_BOT_GH_TOKEN }}