Revert "feat: SP1 banner" #103
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: Microsite Dev Deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install pack | |
uses: jvalkeal/[email protected] | |
with: | |
pack-version: 0.24.1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.2.0 | |
- uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_DEV_CREDENTIALS }} | |
- uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.AZURE_DEV_REGISTRY_URL }} | |
username: ${{ secrets.AZURE_DEV_REGISTRY_USERNAME }} | |
password: ${{ secrets.AZURE_DEV_REGISTRY_PASSWORD }} | |
- name: Yarn build | |
env: | |
NODE_OPTIONS: '--openssl-legacy-provider' | |
run: | | |
yarn install | |
yarn run fix | |
yarn build | |
- name: Prepare Paketo | |
run: | | |
cp -R public paketo/ | |
- name: Setup Tag | |
run: | | |
echo TAG=$(date +%y%m%d%H%M%S)-${{ github.sha }} >> $GITHUB_ENV | |
- name: Build Image | |
working-directory: ./paketo | |
run: | | |
pack build ${{ secrets.AZURE_DEV_REGISTRY_URL }}/scdf-microsite-dev:$TAG \ | |
--buildpack gcr.io/paketo-buildpacks/nginx \ | |
--builder gcr.io/paketo-buildpacks/builder:base | |
docker push ${{ secrets.AZURE_DEV_REGISTRY_URL }}/scdf-microsite-dev:$TAG | |
- name: Deploy | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: scdfmicrositedev | |
images: ${{ secrets.AZURE_DEV_REGISTRY_URL }}/scdf-microsite-dev:${{ env.TAG }} | |
slot-name: green | |
- name: Swap green/production | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: | | |
az webapp deployment slot swap --resource-group scdfmicrosite-dev --name scdfmicrositedev --slot green |