Update EAC email template #18
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, Test, Deploy | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- CONTRIBUTING.md | |
- README.md | |
- .gitignore | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: [master] | |
env: | |
AZURE_FUNCTIONAPP_NAME: TrueVoteComms | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: './TrueVote.Comms' | |
DOTNET_VERSION: '9.0.x' | |
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 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Restore Dependencies | |
run: | | |
dotnet restore | |
dotnet tool restore | |
- name: Versions | |
run: | | |
dotnet --version | |
git --version | |
az --version | |
- name: Build | |
run: | | |
dotnet build --no-restore | |
- name: Build Release Version | |
shell: pwsh | |
run: | | |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | |
dotnet build --no-restore --configuration Release --output ./output | |
popd | |
- name: Deploy to Azure Production | |
if: github.ref == 'refs/heads/master' | |
uses: Azure/[email protected] | |
id: fa | |
with: | |
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }} | |
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output' | |
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} |