Deploy to neocities #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to neocities | |
# run on changes to main branch or when manually triggered | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
FORCE_COLOR: 2 | |
concurrency: # prevent concurrent deploys doing strange things | |
group: deploy-to-neocities | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
- run: bun i --save-dev | |
- run: bun run build | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: website-artifacts | |
path: _site | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: website-artifacts | |
path: _site | |
- name: List contents of the working directory | |
run: ls -al | |
- name: Deploy to neocities | |
uses: bcomnes/deploy-to-neocities@v2 | |
with: | |
api_token: ${{ secrets.NEOCITIES_API_TOKEN }} | |
cleanup: true | |
dist_dir: _site |