Add new blog post (#31) #14
This file contains hidden or 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: Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| deploy_comment: | |
| description: "Reason for deployment" | |
| required: true | |
| default: "Manual deployment" | |
| type: string | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Connect to MFM to ensure shell access is active | |
| uses: baisong/[email protected] | |
| with: | |
| comment: ${{ inputs.deploy_comment }} | |
| user: ${{ vars.MFM_USER }} | |
| password: ${{ secrets.MFM_PASSWORD }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build website | |
| run: npm run build | |
| - name: Copy build to MFM server | |
| uses: nogsantos/[email protected] | |
| with: | |
| src: ./build/* | |
| host: ${{ vars.MFM_SSH_HOST }} | |
| remote: ${{ vars.MFM_SCP_PATH }} | |
| port: ${{ vars.MFM_SSH_PORT }} | |
| user: ${{ vars.MFM_USER }} | |
| key: ${{ secrets.MFM_SSH_KEY }} |