Skip to content

exploded imgur embed #1332

exploded imgur embed

exploded imgur embed #1332

Workflow file for this run

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}'