Skip to content

Commit

Permalink
first test of github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Nov 26, 2024
1 parent 44498bf commit 337c58c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: Upload files to mil.ufl.edu
# yamllint disable-line rule:truthy
on:
push:
branches:
- main

jobs:
upload:
Expand All @@ -15,6 +13,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "latest"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Build site
run: npm run build && cd dist

- name: Install lftp
run: sudo apt-get install -y lftp sshpass

Expand All @@ -23,6 +33,8 @@ jobs:
# We need to connect to the server for lftp to be happy, otherwise it
# hangs on "Connecting...". Connecting will add the host to
# known_hosts.
# Move .htaccess into dist so it gets copied
mv .htaccess dist
sshpass -p ${{ secrets.MIL_UFL_SFTP_PASS }} \
sftp -o StrictHostKeyChecking=no \
-P ${{ secrets.MIL_UFL_SFTP_PORT }} [email protected] << EOF
Expand All @@ -32,10 +44,9 @@ jobs:
-p ${{ secrets.MIL_UFL_SFTP_PORT }} sftp://mil.ufl.edu << EOF
mirror -c \
--include='.*' \
--exclude='^\..*$' \
--exclude='README.md' \
-R --parallel --verbose \
. \
dist \
htdocs
exit
EOF

0 comments on commit 337c58c

Please sign in to comment.