albums added #68
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: Build and Deploy Eleventy | |
on: | |
push: | |
branches: ["master"] | |
workflow_dispatch: | |
# Set permissions for GitHub Pages deployment | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js >= 14.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: npm install | |
- name: Build the site with Eleventy | |
run: npx @11ty/eleventy | |
- name: upload static site content | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./_site | |
- name: Deploy to NekoWeb | |
uses: deploy2nekoweb/deploy2nekoweb@v4 | |
with: | |
nekoweb-api-key: ${{ secrets.NEKOWEB_API_KEY }} | |
nekoweb-cookie: ${{ secrets.NEKOWEB_COOKIE }} | |
nekoweb-folder: './_site' | |
directory: './_site' | |
deploy_github_pages: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: https://moosyu.github.io/ | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |