mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-18 19:22:18 +00:00
Prospective fix for failing external pull requests
Run the doc stuff only when building for the master branch
This commit is contained in:
parent
daae440da7
commit
8644048d19
1 changed files with 4 additions and 9 deletions
13
.github/workflows/build_docs.yaml
vendored
13
.github/workflows/build_docs.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue