mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
New docs deploy process
This commit is contained in:
39
.github/workflows/dev-deploy.yml
vendored
39
.github/workflows/dev-deploy.yml
vendored
@@ -1,39 +0,0 @@
|
||||
name: Dev Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '.luacheckrc'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- 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: Generate Documents
|
||||
working-directory: docs
|
||||
run: ldoc -i .
|
||||
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v4
|
||||
with:
|
||||
message: "Automatic Doc Update"
|
||||
add: "./docs/** .luacheckrc"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
64
.github/workflows/docs-deploy.yml
vendored
Normal file
64
.github/workflows/docs-deploy.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
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
|
||||
Reference in New Issue
Block a user