Merge pull request #3 from AKVorrat/integration-docs #52
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 DearMEP site to Pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-stage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Run install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install # will run `yarn install` command | |
- name: Build page | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: run build:stage # will run `yarn install` command | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dearmep-staging | |
path: ./public | |
# Deployment job | |
deploy-stage: | |
name: π Deploy stage | |
environment: | |
name: staging | |
url: https://stage.dearmep.eu | |
runs-on: ubuntu-latest | |
needs: build-stage | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dearmep-staging | |
- name: π Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: webhost.epicenter.works | |
protocol: ftps | |
username: stage | |
password: ${{ secrets.ftp_password_stage }} | |
server-dir: ./public_html/ | |
build-production: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Run install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install # will run `yarn install` command | |
- name: Build page | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: run build # will run `yarn install` command | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dearmep-production | |
path: ./public | |
# Deployment job | |
deploy-production: | |
name: π Deploy production | |
environment: | |
name: production | |
url: https://dearmep.eu | |
runs-on: ubuntu-latest | |
needs: build-production | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dearmep-production | |
- name: π Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: webhost.epicenter.works | |
protocol: ftps | |
username: dearmep | |
password: ${{ secrets.ftp_password_prod }} | |
server-dir: ./public_html/ | |