Skip to content

Commit

Permalink
Revert "chore: simplify deployment script"
Browse files Browse the repository at this point in the history
This reverts commit 367b7eb.
  • Loading branch information
aekasitt committed Nov 14, 2024
1 parent 367b7eb commit 188848d
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,55 @@
name: Deploy

name: Deploy to GitHub Pages
on:
push:
branches:
- master

workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@v4.1.7
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
node-version: 18

version: 9.5.0
- name: install Nodejs
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
uses: bahmutov/npm-install@v1

run: pnpm install
- name: Build project
run: npm run build

run: pnpm run build
- name: Upload production-ready build files
uses: actions/upload-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
name: production-files
name: github-pages
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

permissions:
pages: write
contents: write
id-token: write
actions: read

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: production-files
name: github-pages
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 188848d

Please sign in to comment.