Skip to content

Merge pull request #595 from iterate-ch/issue/12 #1121

Merge pull request #595 from iterate-ch/issue/12

Merge pull request #595 from iterate-ch/issue/12 #1121

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: iterate-ch/sphinx-action@v1.0
with:
docs-folder: "."
build-command: "make dirhtml"
- name: Cache artifacts
uses: actions/cache@v4
if: github.ref == 'refs/heads/main'
with:
key: html-${{ github.sha }}
path: ./_build/dirhtml
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Cache artifacts
uses: actions/cache@v4
with:
key: html-${{ github.sha }}
path: ./_build/dirhtml
- name: Deploy
uses: iterate-ch/cyberduck-cli-action@v1
id: upload
env:
USERNAME: '${{ secrets.AWS_ACCESS_KEY_ID }}'
PASSWORD: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
with:
mode: upload
url: 's3:/github-cyberduck-docs/'
path: './_build/dirhtml/*'
args: '--existing compare --region ${{ secrets.AWS_DEFAULT_REGION }}'
- name: Purge CDN
uses: iterate-ch/cyberduck-cli-action@v1
id: purge
env:
USERNAME: '${{ secrets.AWS_ACCESS_KEY_ID }}'
PASSWORD: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
with:
mode: purge
url: 's3:/github-cyberduck-docs/'
args: '--region ${{ secrets.AWS_DEFAULT_REGION }}'