This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
chore: deprecation notice #324
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Aliucord CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@master | |
- name: Checkout builds branch | |
uses: actions/checkout@master | |
with: | |
ref: builds | |
path: builds | |
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json | |
- name: Use Node.js 17 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 17 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build aliucord | |
run: pnpm lint && pnpm build | |
- name: Upload dist folder as artifact | |
uses: actions/upload-artifact@v3 | |
if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch) # Only runs if this CI was not triggered by the default branch | |
with: | |
name: dist | |
path: dist/* | |
- name: Upload dist folder to builds branch | |
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # Only runs if this CI was triggered by the default branch | |
run: | | |
cd builds | |
cp ../dist/* . | |
cp ../data.json . | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git pull | |
git add -A | |
git commit -m "Build $GITHUB_SHA" || true | |
git push |