Skip to content

fix(audit): Correções de vulnerabilidade #279

fix(audit): Correções de vulnerabilidade

fix(audit): Correções de vulnerabilidade #279

name: Azure Static Web Apps CI/CD
permissions:
contents: read
pull-requests: write
id-token: write
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '22.12'
- run: npm install
- name: Run unit tests
run: npm run test:nowatch
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium firefox
- name: Run E2E tests
run: npm run test:e2e
env:
CI: true
- name: Fix Git Permissions
run: chmod -R u+w .git
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ASHY_SKY_078D43C0F }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: 'upload'
app_location: '/' # App source code path
api_location: '' # Api source code path - optional
output_location: 'dist/robsonalves/browser' # Built app content directory - optional
#deployment_environment: 'Production'
app_build_command: 'npm run build:prod'
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
timeout-minutes: 10
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ASHY_SKY_078D43C0F }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'close'