Skip to content

Fix security workflow #57

Fix security workflow

Fix security workflow #57

Workflow file for this run

name: Update Documentation
on:
push:
branches:
- master
jobs:
github-pages:
runs-on:
- ubuntu-latest
steps:
- name: Checkout
# Do not use version numbers because they are NOT immutable.
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Install Node
uses: actions/setup-node@aa759c6c94d3800c55b8601f21ba4b2371704cb7
with:
node-version: 14.17.2
- name: Build docs
run: |
npm install
npm run docs
cd docs
tar czf ../pages.tgz .
- name: Upload new pages for later steps
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: pages
path: pages.tgz
retention-days: 1
- name: Change to pages branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
ref: gh-pages
- name: Download new pages for later steps
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: pages
- name: Add new docs
run: |
tar xzf pages.tgz
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor}}@users.noreply.github.com"
git add $(tar tzf pages.tgz)
git commit -m 'New doc pages from GitHub Workflow'
git push origin gh-pages