Skip to content

update astro

update astro #90

Workflow file for this run

name: Deploy to Neocities
defaults:
run:
working-directory: ./frontend
concurrency:
group: deploy-to-neocities
cancel-in-progress: true
on:
push:
branches:
- 'main'
workflow_dispatch:
inputs:
logLevel:
description: 'Run workflow'
required: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository code
uses: actions/checkout@v3
- run: echo "🎉 Job automatically triggered by ${{ github.event_name }} event."
- run: echo "🐧 Running on ${{ runner.os }}!"
- run: echo "🔎 Branch :/ ${{ github.ref }}"
- run: echo "🔎 Repository:/ ${{ github.repository }}."
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Get npm cache directory
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies and build site
run: |
npm install
npm run build
- name: Deploy to Neocities
uses: bcomnes/deploy-to-neocities@v1
with:
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
cleanup: true
dist_dir: frontend/dist