|
name: Deploy to production |
|
|
|
on: |
|
workflow_dispatch: |
|
push: |
|
branches: |
|
- main |
|
|
|
jobs: |
|
deploy: |
|
runs-on: ubuntu-latest |
|
|
|
steps: |
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
|
|
|
- name: Use Node.js |
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 |
|
with: |
|
node-version: '24.x' |
|
cache: 'yarn' |
|
- run: yarn install --frozen-lockfile |
|
- run: yarn build |
|
|
|
- name: copy compiled assets to remote |
|
uses: appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1.0.0 |
|
with: |
|
host: ${{ secrets.DEPLOY_HOST }} |
|
username: ${{ secrets.DEPLOY_USERNAME }} |
|
key: ${{ secrets.DEPLOY_SSH_KEY }} |
|
port: ${{ secrets.DEPLOY_PORT }} |
|
source: build |
|
target: public_html/docs.flarum.org |