Convert to ?anchor= to survive IIS rewriting #86
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: Build and deploy staging | |
on: | |
push: | |
branches: | |
- staging | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js version | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
- name: Install and build | |
run: | | |
yarn | |
yarn build | |
- name: Build redirects | |
run: | | |
node ./script/redirects.js | |
- name: Copy rewrites to server root | |
run: | | |
cp web.config public/ | |
- name: Upload artifact for deployment job | |
uses: actions/upload-artifact@v2 | |
with: | |
name: node-app | |
path: ./public/ | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: 'staging' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
steps: | |
- name: Az CLI login | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZURE_STAGING_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Download artifact from build job | |
uses: actions/download-artifact@v2 | |
with: | |
name: node-app | |
- name: Deploy to Azure Web App service | |
uses: azure/webapps-deploy@v2 | |
id: deploy-to-webapp | |
with: | |
app-name: 'primerstyle' | |
slot-name: 'staging' | |
package: . |