Skip to content

fix

fix #19

Workflow file for this run

name: Node CI
on:
push:
branches:
- "docusaurus"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
deployments: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
name: Build pages
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: "npm"
- name: Prepare Environment
run: |
npm ci
env:
CI: true
- name: Run docusaurus
run: |
npm run build
env:
CI: true
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: "./build"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: docusaurus
path: "./build"
# Deployment job
deploy:
name: Deploy pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
# Deployment job
deploy-ssh:
name: Deploy to casparcg.com
environment:
name: casparcg.com
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: docusaurus
path: build
- name: Prepare Environment
run: |
pwd
ls -lah
env:
CI: true
- name: Upload
uses: SamKirkland/web-deploy@v1
with:
target-server: ${{secrets.DEPLOY_SSH_HOST}}
remote-user: ${{secrets.DEPLOY_SSH_USERNAME}}
private-ssh-key: ${{secrets.DEPLOY_SSH_KEY}}
destination-path: ${{secrets.DEPLOY_PATH}}
source-path: build/
rsync-options: --archive --verbose --compress --human-readable --progress --delete-after --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore --dry-run