Update astro.yml

This commit is contained in:
Henry Hiles 2025-03-23 20:15:33 -04:00 committed by GitHub
parent efb7ff89ea
commit 547589cc46
Failed to generate hash of commit

View file

@ -5,13 +5,15 @@ on:
branches: ["main"] branches: ["main"]
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency: concurrency:
group: "pages" group: "pages"
cancel-in-progress: false cancel-in-progress: false
env:
BUILD_PATH: "."
jobs: jobs:
build: build:
name: Build name: Build
@ -23,7 +25,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "20"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v2
name: Install pnpm name: Install pnpm
@ -51,18 +53,21 @@ jobs:
working-directory: ${{ env.BUILD_PATH }} working-directory: ${{ env.BUILD_PATH }}
- name: Build with Astro - name: Build with Astro
run: | run: pnpm astro build
pnpm astro build
working-directory: ${{ env.BUILD_PATH }}
- name: Install SSH key - name: Upload artifact
uses: shimataro/ssh-key-action@6f350ca8484d8d55c2e361e74d17e638dabe713a uses: actions/upload-pages-artifact@v3
with: with:
key: ${{ secrets.SSH_KEY }} path: dist
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Copy files to VM deploy:
run: rsync -chav --delete ${{ env.BUILD_PATH }}/dist/ ${{ secrets.USER_AND_IP }}:/var/www/HenryHiles/tmp environment:
name: github-pages
- name: Execute remote command url: ${{ steps.deployment.outputs.page_url }}
run: ssh ${{ secrets.USER_AND_IP }} sudo /var/www/deploy-astro.sh www.henryhiles.com HenryHiles needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4