Update .github/workflows/deploy.yml
This commit is contained in:
parent
92aa3b6f74
commit
93533042b9
1 changed files with 46 additions and 46 deletions
92
.github/workflows/deploy.yml
vendored
92
.github/workflows/deploy.yml
vendored
|
|
@ -1,59 +1,59 @@
|
||||||
name: Build and deploy
|
name: Build and deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
|
|
||||||
- name: Deps
|
- name: Deps
|
||||||
run: |
|
run: |
|
||||||
npm install --global pnpm
|
npm install --global pnpm
|
||||||
pnpm i
|
pnpm i
|
||||||
|
|
||||||
- name: Build plugin(s)
|
- name: Build plugin(s)
|
||||||
run: pnpm lune ci
|
run: pnpm lune ci
|
||||||
|
|
||||||
- name: Copy additional files
|
- name: Copy additional files
|
||||||
run: |
|
run: |
|
||||||
cp README.md dist/README.md
|
cp README.md dist/README.md
|
||||||
printf -- "---\npermalink: /404.html\n---\n" > dist/404.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
|
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
|
cat README.md >> dist/404.md
|
||||||
|
|
||||||
- name: Upload production-ready build files
|
- name: Upload production-ready build files
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: production-files
|
name: production-files
|
||||||
path: ./dist
|
path: ./dist
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy
|
name: Deploy
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: production-files
|
name: production-files
|
||||||
path: ./dist
|
path: ./dist
|
||||||
|
|
||||||
- name: Upload ftp
|
- name: Upload ftp
|
||||||
uses: https://git.lgbt/mirror/ftp-action@releases/v2
|
uses: https://git.lgbt/mirror/ftp-action@releases/v2
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.FTP_SERVER }}
|
host: ${{ secrets.FTP_SERVER }}
|
||||||
user: ${{ secrets.FTP_USER }}
|
user: ${{ secrets.FTP_USER }}
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
password: ${{ secrets.FTP_PASSWORD }}
|
||||||
localDir: "dist"
|
localDir: "dist"
|
||||||
remoteDir: "amy.rip"
|
remoteDir: "amy.rip"
|
||||||
options: "--delete"
|
options: "--delete"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue