Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Oct 11, 2024
1 parent 03aaa4f commit 6750e33
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
name: Deploy Vite App to GitHub Pages
name: Deploy Vite React to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: 'pages'
cancel-in-progress: false

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

steps:
Expand All @@ -30,22 +16,16 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: 18

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './dist'

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

0 comments on commit 6750e33

Please sign in to comment.