Skip to content

Commit

Permalink
Merge pull request #84 from sasarafu/feature/ghpages
Browse files Browse the repository at this point in the history
GitHub Pagesにデプロイするように
  • Loading branch information
sasarafu authored Aug 11, 2024
2 parents fc74a42 + 82fe6fe commit ec2ce0a
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/deploy-dev-ghpages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: deploy-dev-ghpages

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

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

concurrency:
group: 'deploy-dev-ghpages'
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: setup nodejs
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'npm'

- name: Setup Pages
uses: actions/configure-pages@v5
with:
static_site_generator: nuxt

- name: restore cache
uses: actions/cache@v4
with:
path: |
dist
.nuxt
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
restore-keys: |
${{ runner.os }}-nuxt-build-
- name: install dependencies
run: npm ci

- name: generate static files
run: npm run generate

- name: upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit ec2ce0a

Please sign in to comment.