Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate CI & CD Workflows #82

Merged
merged 6 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Wiki CI
on:
pull_request:

env:
NODE_VERSION: 20.x

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install packages
run: npm ci
- name: Build
run: npm run build
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
44 changes: 23 additions & 21 deletions .github/workflows/wiki.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
name: Wiki CI
name: Wiki CD
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
push:
branches-ignore:
- cwdin-backups
- 'crowdin/**'

env:
NODE_VERSION: 18.x
NODE_VERSION: 20.x

jobs:
deploy:
name: Deploy
if: github.ref == 'refs/heads/main'
build:
name: Build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
Expand All @@ -36,11 +25,24 @@ jobs:
- name: Build
run: npm run build
- name: Configure GitHub Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v4
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy Wiki
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4