Created
December 15, 2019 07:21
-
-
Save justinyoo/b51f3a69f62bdcc7ba4e3ef5c37c204c to your computer and use it in GitHub Desktop.
Building CI/CD Pipelines with GitHub Actions
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: Download app | |
uses: actions/download-artifact@v1 | |
with: | |
name: app | |
path: src/WebApp/dist |
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: Upload app | |
uses: actions/upload-artifact@v1 | |
with: | |
name: app | |
path: src/WebApp/dist |
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
... | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
... | |
deploy_to_dev: | |
needs: build_and_publish | |
runs-on: ubuntu-latest | |
... | |
deploy_to_test: | |
needs: deploy_to_dev | |
runs-on: ubuntu-latest | |
... | |
deploy_to_prod: | |
needs: deploy_to_test | |
runs-on: ubuntu-latest | |
... |
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
... | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
... | |
deploy_to_dev: | |
needs: build_and_publish | |
runs-on: ubuntu-latest | |
... | |
deploy_to_test: | |
needs: build_and_publish | |
runs-on: ubuntu-latest | |
... | |
deploy_to_prod: | |
needs: build_and_publish | |
runs-on: ubuntu-latest | |
... |
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
deploy_to_dev: | |
needs: build_and_publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download app | |
uses: actions/download-artifact@v1 | |
with: | |
name: app | |
path: src/WebApp/dist | |
- name: Login to Azure | |
uses: Azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Publish app | |
uses: Azure/cli@v1.0.0 | |
with: | |
azcliversion: latest | |
inlineScript: | | |
az storage blob upload-batch -s $GITHUB_WORKSPACE/src/WebApp/dist -d \$web --account-name ${{ secrets.STORAGE_ACCOUNT_NAME }} | |
deploy_to_prod: | |
needs: deploy_to_dev | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download app | |
uses: actions/download-artifact@v1 | |
with: | |
name: app | |
path: src/WebApp/dist | |
- name: Login to Azure | |
uses: Azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Publish app | |
uses: Azure/cli@v1.0.0 | |
with: | |
azcliversion: latest | |
inlineScript: | | |
az storage blob upload-batch -s $GITHUB_WORKSPACE/src/WebApp/dist -d \$web --account-name ${{ secrets.STORAGE_ACCOUNT_NAME_2 }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment