Skip to content

Commit

Permalink
Improve deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsc0301 committed Jun 29, 2023
1 parent 322f9bd commit 349c85c
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,46 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

# Runs a single command using the runners shell
- name: Build the project
run: npm install && npm run build

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

- name: Runs node
run: cd server && node index.js
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 349c85c

Please sign in to comment.