Skip to content

Commit

Permalink
u: .
Browse files Browse the repository at this point in the history
  • Loading branch information
leugimkm committed Jan 1, 2024
1 parent 0718b5f commit c1ae5ad
Showing 1 changed file with 31 additions and 37 deletions.
68 changes: 31 additions & 37 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,43 @@
name: Deploy
name: Deploy static content to Pages

on:
push:
branches:
- main
branches: ['main']
workflow_dispatch:

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

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
name: Build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

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

- name: Setup Node
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3

with:
node-version: 18
cache: 'npm'
- name: Install dependencies
uses: bahmutov/npm-install@v1

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

- name: Upload production-ready build files
uses: actions/upload-artifact@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
name: production-files
path: ./dist

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

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist

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@v2

0 comments on commit c1ae5ad

Please sign in to comment.