Setup workflows to pull git LFS recursively too. #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automatically deploy the latest changes to the FTP server. | |
on: | |
# Triggers the workflow on push events but only for the "master" branch. | |
push: | |
branches: [ "master" ] | |
# Allows this workflow to be run manually from the Actions tab. | |
workflow_dispatch: | |
name: 🚀 Auto-Deploy | |
jobs: | |
web-deploy: | |
name: 🎉 Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v4.2.0 | |
with: | |
submodules: 'recursive' | |
lfs: true | |
- name: 📥 Fetch LFS objects | |
run: | | |
git lfs fetch --all | |
git submodule foreach --recursive 'git lfs fetch --all' | |
- name: 📥 Checkout LFS objects | |
run: | | |
git lfs checkout | |
git submodule foreach --recursive git lfs checkout | |
- uses: actions/setup-node@master | |
- name: 📥 Install project dependencies | |
run: yarn | |
- name: ⚒️ Build the project | |
run: yarn build | |
- name: 📂 Sync files | |
uses: SamKirkland/FTP-Deploy-Action@4.3.0 | |
with: | |
server: ftp-staging.vircadia.dev | |
username: ${{ secrets.ftp_username }} | |
password: ${{ secrets.ftp_password }} | |
local-dir: build/ | |
dry-run: false |