Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kobe-koto committed Oct 21, 2023
2 parents 9313ef3 + 76d24f2 commit a69310e
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Deploy Astro Application to Github Pages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

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

- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20.0

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build via pnpm run build
run: pnpm run build

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

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

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

0 comments on commit a69310e

Please sign in to comment.