Refactor Astro configuration and add RSS feed #31
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: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install node packages | |
run: npm install | |
- name: Build production static files | |
run: npm run build | |
- name: Copy the staticwebapp.config.json file to the dist folder | |
run: cp ./staticwebapp.config.json ./dist | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: ./dist | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: ./dist | |
- name: Deploy to Azure Static Web Apps | |
uses: azure/static-web-apps-deploy@latest | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_DEPLOYMENT_TOKEN }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
action: "upload" | |
###### Repository/Build Configurations ###### | |
app_location: "./dist" | |
api_location: "" | |
output_location: "" | |
skip_app_build: true | |
###### End of Repository/Build Configurations ###### |