Files
factorio-scenario-ExpCluster/.github/workflows/docs-deploy.yml
2024-01-16 01:04:24 +00:00

65 lines
1.5 KiB
YAML

name: Docs Deploy
on:
# Deploy when there is a push to dev
push:
branches:
- dev
# Allow runing this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install Lua
uses: leafo/gh-actions-lua@v8.0.0
- name: Install LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Install LDoc
run: luarocks install ldoc 1.4.4-1
- name: Create Docs Folder
run: mkdir -p docs
- name: Generate Documents
working-directory: docs
run: ldoc -i .
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs
deploy:
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@v4