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
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
|
||||
- name: Deps
|
||||
run: |
|
||||
npm install --global pnpm
|
||||
pnpm i
|
||||
- name: Deps
|
||||
run: |
|
||||
npm install --global pnpm
|
||||
pnpm i
|
||||
|
||||
- name: Build plugin(s)
|
||||
run: pnpm lune ci
|
||||
- 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: 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
|
||||
- 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
|
||||
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"
|
||||
- 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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue