Skip to content

Commit

Permalink
build(github_action): modify github action to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
javierhersan committed May 27, 2024
1 parent 5cf9bee commit 77b839a
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/azure-static-web-apps-brave-glacier-0a3a05903.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,23 @@ jobs:
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
- name: Set up Node.js
uses: actions/setup-node@v3
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BRAVE_GLACIER_0A3A05903 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: 'upload'
node_version: 20
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: '/' # App source code path
api_location: '' # Api source code path - optional
output_location: 'dist' # Built app content directory - optional
###### End of Repository/Build Configurations ######
node-version: '16' # Specify the Node.js version you need
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm build
- name: Install Azure Static Web Apps CLI
run: npm install -g @azure/static-web-apps-cli
- name: Deploy to Azure Static Web Apps
env:
AZURE_STATIC_WEB_APPS_API_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BRAVE_GLACIER_0A3A05903 }}
run: |
pnpm dlx deploy ./dist --api-token $AZURE_STATIC_WEB_APPS_API_TOKEN --env production
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
Expand Down

0 comments on commit 77b839a

Please sign in to comment.