Skip to content

ALL in one

ALL in one #41

Workflow file for this run

name: ALL in one
on:
workflow_dispatch:
inputs:
name:
description: "Build"
required: False
default: ""
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
- name: Draft Release
# Only run on new tags and upload the AIO file
uses: actions/create-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
body: |
AIO file for this release is attached.
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
docgen:
name: "DocGen"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.MILE_PAT }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install --save jsdom wkhtmltopdf
- name: Generate docs
run: npm run docgen
# Should commit the docs folder to the repo
- name: Commit docs
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update docs"
commit_options: "--no-verify --signoff"
commit_user_name: "GitHub Actions"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "GitHub Actions <github-actions[bot]@users.noreply.github.com>"
file_pattern: docs/DOCGEN.mil