Skip to content

Deploy Development Website #75

Deploy Development Website

Deploy Development Website #75

Workflow file for this run

name: Deploy Development Website
on:
workflow_run:
workflows: ["Build Development Website"]
types:
- completed
jobs:
deploy-development:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: 3.x
- name: "Download built site"
uses: actions/[email protected]
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "development_site"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/development_site.zip', Buffer.from(download.data));
- run: unzip development_site.zip
- name: Deploy preview directory
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: site
target-folder: development_site
commit-message: Deploy Development Preview
force: false