1
Fork 0
This repository has been archived on 2024-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
tic-tac-toe/.github/workflows/vite_deploy.yaml

54 lines
1.3 KiB
YAML
Raw Normal View History

2024-05-31 20:30:26 +00:00
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
2024-06-02 17:52:05 +00:00
branches: ["main"]
2024-05-31 20:30:26 +00:00
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
2024-06-02 17:52:05 +00:00
group: "pages"
2024-05-31 20:30:26 +00:00
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
2024-06-02 17:52:05 +00:00
cache: "npm"
2024-05-31 20:30:26 +00:00
- name: Install dependencies
2024-06-01 04:42:53 +00:00
run: |
rm package-lock.json
npm install
2024-05-31 20:30:26 +00:00
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
2024-06-02 17:52:05 +00:00
path: "./dist"
2024-05-31 20:30:26 +00:00
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4