mirror of
https://github.com/pushbits/server.git
synced 2025-04-29 18:26:49 +02:00
Update target branch for documentation workflow
This commit is contained in:
parent
7e2193bd07
commit
56f39cf64c
1 changed files with 4 additions and 7 deletions
11
.github/workflows/documentation.yml
vendored
11
.github/workflows/documentation.yml
vendored
|
@ -10,13 +10,16 @@ on:
|
|||
- '**.yaml'
|
||||
- '**.json'
|
||||
|
||||
env:
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
|
||||
jobs:
|
||||
build_documentation:
|
||||
name: Build documentation
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v2
|
||||
|
@ -41,15 +44,11 @@ jobs:
|
|||
run: npx redoc-cli bundle docs/swagger.yaml --output index.html
|
||||
|
||||
- name: Setup SSH keys and known_hosts
|
||||
env:
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
run: |
|
||||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
||||
ssh-add - <<< "${{ secrets.WEBSITE_DEPLOY_KEY }}"
|
||||
|
||||
- name: Checkout website
|
||||
env:
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
run: mkdir website && git clone git@github.com:pushbits/website.git website
|
||||
|
||||
- name: Copy index.html
|
||||
|
@ -59,8 +58,6 @@ jobs:
|
|||
run: git config --global user.email "pipeline@pushbits.io" && git config --global user.name "PushBits Pipeline"
|
||||
|
||||
- name: Commit and push
|
||||
env:
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
run: |
|
||||
cd website
|
||||
git diff --quiet || ( git add . && git commit -m "Update documentation to ${{ github.sha }}" && git push )
|
||||
|
|
Loading…
Add table
Reference in a new issue