Enable RSS feeds (#267) #1425
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
name: Deploy | |
on: | |
push: # Must be push, not PR, for GITHUB_REF_NAME in website links | |
workflow_call: | |
inputs: | |
commit: | |
required: false | |
type: string | |
environment: | |
required: false | |
type: string | |
sphinx_github_branch: | |
required: false | |
type: string | |
jobs: | |
Build: | |
uses: ./.github/workflows/build.yml | |
with: | |
commit: "${{ inputs.commit }}" | |
environment: "${{ inputs.environment || 'staging' }}" | |
skip_lints_tests: true | |
sphinx_github_branch: "${{ inputs.sphinx_github_branch }}" | |
Deploy: | |
runs-on: ubuntu-latest | |
environment: "${{ inputs.environment || 'staging' }}" | |
needs: Build | |
concurrency: | |
cancel-in-progress: true | |
group: "deploy-${{ inputs.environment || 'staging' }}" | |
steps: | |
- name: Download HTML | |
uses: actions/download-artifact@v4 | |
with: | |
name: html | |
path: html | |
- name: Setup SSH | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: "${{ secrets.SSH_PRIVATE_KEY }}" | |
known_hosts: "${{ vars.SSH_KNOWN_HOSTS }}" | |
- name: Rsync | |
env: | |
SSH_HOST: "${{ vars.SSH_HOST }}" | |
SSH_USER: "${{ secrets.SSH_USER }}" | |
run: rsync -rptcivh --delete-after --stats ./html/ "$SSH_USER@$SSH_HOST:/home/public" | |
- name: Purge Cloudflare Cache | |
env: | |
CF_AUTH: "Authorization: Bearer ${{ secrets.CF_API_TOKEN }}" | |
CF_URL: "https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE_ID }}/purge_cache" | |
run: curl -f "$CF_URL" -H "$CF_AUTH" --data '{"purge_everything":true}' |