Prospective fix for failing external pull requests

Run the doc stuff only when building for the master branch
This commit is contained in:
Simon Hausmann 2024-07-19 16:52:00 +02:00
parent daae440da7
commit 8644048d19

View file

@ -106,13 +106,8 @@ jobs:
npm run docs
working-directory: api/node
- name: check for secrets
id: secrets
run: |
[ -n "${{ secrets.READ_WRITE_PRIVATE_KEY }}" ] && echo "has-website-secrets=yes" >> "$GITHUB_OUTPUT"
- name: Generate a token
if: ${{ steps.secrets.outputs.has-website-secrets }}
if: ${{ github.ref == 'refs/heads/master' }}
id: app-token
uses: actions/create-github-app-token@v1
with:
@ -121,7 +116,7 @@ jobs:
repositories: website
- name: Clone website directory
if: ${{ steps.secrets.outputs.has-website-secrets }}
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/checkout@v4
with:
repository: slint-ui/website
@ -131,13 +126,13 @@ jobs:
persist-credentials: false
- name: Generate release-docs.html and 404.html
if: ${{ steps.secrets.outputs.has-website-secrets }}
if: ${{ github.ref == 'refs/heads/master' }}
run: |
mkdir -p website/output
cd website && go run generator/generator.go -skip-agreements
- name: Copy release-docs.html and 404.html
if: ${{ steps.secrets.outputs.has-website-secrets }}
if: ${{ github.ref == 'refs/heads/master' }}
run: |
cp website/output/release-docs.html docs/site/index.html
cp website/output/404.html docs/site/404.html