mirror of
https://github.com/EyeTrackVR/EyeTrackVR-Docs.git
synced 2025-11-04 14:49:44 +08:00
docs: new docs incoming
- add CI/CD - remove old docs files - begin finalizing new docs
This commit is contained in:
parent
5a30571196
commit
d6eab9b1c0
128
.github/workflows/build_release_vitepress.yml
vendored
128
.github/workflows/build_release_vitepress.yml
vendored
@ -4,90 +4,80 @@ on:
|
||||
workflow_dispatch: {}
|
||||
push:
|
||||
branches: [docs]
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
environment:
|
||||
name: github-pages
|
||||
|
||||
name: Build CodeBase
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
- name: Install dependencies
|
||||
run: cd vitepress && yarn install --frozen-lockfile
|
||||
#- name: Install dependencies
|
||||
# uses: Borales/actions-yarn@v4.2.0
|
||||
# with:
|
||||
# cmd: install
|
||||
# dir: vitepress
|
||||
- name: Build project
|
||||
run: cd vitepress && yarn build
|
||||
- uses: actions/configure-pages@v2
|
||||
- uses: actions/upload-pages-artifact@v1
|
||||
run: cd vitepress && yarn && yarn build
|
||||
- name: Upload production-ready build files
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: production-files
|
||||
path: ./vitepress/docs/.vitepress/dist
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
name: Deploy
|
||||
needs: [build]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Create Directory
|
||||
run: mkdir -p dist
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: production-files
|
||||
path: dist/
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- run: npm install -g conventional-changelog-conventionalcommits
|
||||
- run: npm install -g semantic-release@v19.0.5
|
||||
- run: npm install -g @semantic-release/exec
|
||||
- run: npm install -g @semantic-release/git
|
||||
- run: npm install -g @semantic-release/release-notes-generator
|
||||
- run: npm install -g @semantic-release/changelog
|
||||
- run: npm install -g @semantic-release/github
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: semantic-release
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v1
|
||||
#deploy:
|
||||
# environment:
|
||||
# name: github-pages
|
||||
# url: ${{ steps.deployment.outputs.page_url }}
|
||||
# runs-on: ubuntu-latest
|
||||
# name: Deploy
|
||||
# needs: [build]
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
# - name: Create Directory
|
||||
# run: mkdir -p dist
|
||||
# - name: Download artifact
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: production-files
|
||||
# path: dist/
|
||||
# - name: Setup node
|
||||
# uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 18
|
||||
# - run: npm install -g conventional-changelog-conventionalcommits
|
||||
# - run: npm install -g semantic-release@v19.0.5
|
||||
# - run: npm install -g @semantic-release/exec
|
||||
# - run: npm install -g @semantic-release/git
|
||||
# - run: npm install -g @semantic-release/release-notes-generator
|
||||
# - run: npm install -g @semantic-release/changelog
|
||||
# - run: npm install -g @semantic-release/github
|
||||
# - name: Release
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# run: semantic-release
|
||||
# - name: Deploy to GitHub Pages
|
||||
# uses: peaceiris/actions-gh-pages@v3
|
||||
# with:
|
||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# publish_dir: ./dist
|
||||
#cleanup:
|
||||
# name: Cleanup actions
|
||||
# needs:
|
||||
# - deploy
|
||||
# runs-on: ubuntu-latest
|
||||
# timeout-minutes: 10
|
||||
# steps:
|
||||
# - name: "♻️ remove build artifacts"
|
||||
# uses: geekyeggo/delete-artifact@v1
|
||||
# with:
|
||||
# name: production-files
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./dist
|
||||
cleanup:
|
||||
name: Cleanup actions
|
||||
needs:
|
||||
- deploy
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: "♻️ remove build artifacts"
|
||||
uses: geekyeggo/delete-artifact@v1
|
||||
with:
|
||||
name: production-files
|
||||
|
||||
Loading…
Reference in New Issue
Block a user