reswitch talks #232
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: Publish to preprod | |
| on: | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| build-deploy: | |
| name: Build & deploy the website | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: coursier/setup-action@v1.3.4 | |
| with: | |
| jvm: adoptium:1.17.0.7 | |
| apps: sbt | |
| - name: Compile | |
| run: | | |
| sbt "compile; fullLinkJS" | |
| npm install | |
| npx sass src/main/resources/css/main.scss src/main/resources/css/output.css | |
| - name: Build website | |
| run: | | |
| npm run build | |
| mv dist dist-prod | |
| cp robots.txt dist-prod/robots.txt | |
| - name: Commit changes | |
| run: | | |
| git config --global user.email ${{ secrets.GIT_EMAIL }} | |
| git config --global user.name ${{ secrets.GIT_NAME }} | |
| git add . | |
| git commit -m "chore: forward changed to preprod" | |
| - name: Deploy to Clever Cloud | |
| run: | | |
| npm install -g clever-tools | |
| clever login --token ${{ secrets.CLEVER_TOKEN }} --secret ${{ secrets.CLEVER_SECRET }} | |
| clever link ${{ secrets.CLEVER_APP_ID_PREPROD}} | |
| clever deploy --force |