docs: update #79
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
name: Deploy to FTP | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
web-deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest code | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Load .env file | |
run: | | |
echo "NUXT_CONTACT_FORM_API=${{secrets.NUXT_CONTACT_FORM_API}}" > .env | |
echo "NUXT_PUBLIC_SITE_URL=${{secrets.NUXT_PUBLIC_SITE_URL}}" >> .env | |
echo "NUXT_GITHUB_TOKEN=${{secrets.NUXT_GITHUB_TOKEN}}" >> .env | |
echo "GQL_GITHUB_HOST=${{secrets.GQL_GITHUB_HOST}}" >> .env | |
echo "NUXT_CALENDLY_ENABLED=${{secrets.NUXT_CALENDLY_ENABLED}}" >> .env | |
echo "NUXT_CALENDLY_URL=${{secrets.NUXT_CALENDLY_URL}}" >> .env | |
echo "NUXT_PUBLIC_GA_ID=${{secrets.NUXT_PUBLIC_GA_ID}}" >> .env | |
echo "NUXT_NODE_ENV=${{secrets.NUXT_NODE_ENV}}" >> .env | |
- name: Build | |
run: | | |
npm run generate | |
- name: Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{secrets.FTP_SERVER}} | |
username: ${{secrets.FTP_USERNAME}} | |
password: ${{secrets.FTP_PASSWORD}} | |
local-dir: ./dist/ | |
server-dir: ./public_html/ |