-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (36 loc) · 1.19 KB
/
deploy.yml
File metadata and controls
39 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: deploy
on:
workflow_run:
workflows: [build]
types: [completed]
branches: [main]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yml
name: 4C-website
path: ${{ github.workspace }}/website
branch: ${{ github.event.repository.default_branch }}
- name: Deploy webiste to 4c-multiphysics.org
shell: bash
run: |
sudo apt-get install -y lftp
cd $LOCAL_DIR
lftp -u $USERNAME --env-password $SERVER -e "set ftp:ssl-protect-data true; set ssl:verify-certificate false; set ftp:list-options -a; cd $SERVER_DIR; mirror -R --delete . .; exit"
env:
SERVER: ${{ vars.FOUR_C_WEBSITE_SERVER }}
USERNAME: ${{ secrets.FOUR_C_WEBSITE_USERNAME }}
LFTP_PASSWORD: ${{ secrets.FOUR_C_WEBSITE_PASSWORD }}
SERVER_DIR: ${{ secrets.FOUR_C_WEBSITE_BASE_PATH }}
LOCAL_DIR: ${{ github.workspace }}/website/