Update mock_server.js #41
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 Website and Mock Server to Deno Deploy | |
on: | |
push: | |
branches: | |
- backend | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
jobs: | |
deploy-website: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Use NodeJs 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: Install npm Packages | |
run: npm install | |
- name: Build the Website | |
run: | | |
npm run build | |
mv src/frontend_compiled/self-evaluation/assets src/frontend_compiled | |
rm -rf src/frontend_compiled/self-evaluation | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'src/frontend_compiled' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
deploy-mock-server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Install Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.45.5 | |
- name: Deploy to Deno Deploy | |
uses: denoland/deployctl@v1 | |
with: | |
project: bandit-mock-server | |
entrypoint: mock_server.js |