Update the website #2
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: Update the website | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "commit-ish to publish" | |
jobs: | |
test_published: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Use latest Node.js | |
uses: actions/setup-node@v3 | |
- name: Get version | |
run: | | |
if [ -n "${{ inputs.version }}" ]; then | |
echo COMMIT="${{ inputs.version }}" >> $GITHUB_ENV | |
else | |
echo COMMIT="${{ github.ref }}" >> $GITHUB_ENV | |
fi | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.COMMIT }} | |
- name: Create site | |
run: tar -cvf "$RUNNER_TEMP/artifact.tar" README.md | |
- name: Upload to Github Pages | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ${{ runner.temp }}/artifact.tar | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |