59 lines
No EOL
1.8 KiB
YAML
59 lines
No EOL
1.8 KiB
YAML
name: Build and deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
|
|
- name: Deps
|
|
run: |
|
|
npm install --global pnpm
|
|
pnpm i
|
|
|
|
- name: Build plugin(s)
|
|
run: pnpm lune ci
|
|
|
|
- name: Copy additional files
|
|
run: |
|
|
cp README.md dist/README.md
|
|
printf -- "---\npermalink: /404.html\n---\n" > dist/404.md
|
|
printf -- "> **Note:** You accessed a link that returned a 404, probably by clicking one of the plugin links. You're supposed to copy the link address and add it into shelter.\n\n" >> dist/404.md
|
|
cat README.md >> dist/404.md
|
|
|
|
- name: Upload production-ready build files
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: production-files
|
|
path: ./dist
|
|
|
|
deploy:
|
|
name: Deploy
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: production-files
|
|
path: ./dist
|
|
|
|
- name: Upload ftp
|
|
uses: https://git.lgbt/mirror/ftp-action@releases/v2
|
|
with:
|
|
host: ${{ secrets.FTP_SERVER }}
|
|
user: ${{ secrets.FTP_USER }}
|
|
password: ${{ secrets.FTP_PASSWORD }}
|
|
localDir: "dist"
|
|
remoteDir: "amy.rip"
|
|
options: "--delete" |