Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions yml #9

Merged
merged 18 commits into from
Jan 27, 2021
Merged

Conversation

Test-Automation-Engineer
Copy link
Contributor

No description provided.

Copy link
Contributor

@GewoonMaarten GewoonMaarten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also include CD in this pull request @mjcarsjens @Test-Automation-Engineer?

@joostvanviegen joostvanviegen added this to the sprint 5 milestone Jan 23, 2021
@Test-Automation-Engineer
Copy link
Contributor Author

@GewoonMaarten as stated before during our weekly, this was the initial setup so we could build and deploy to Azure webapps from Github instead of Azure Pipelines and improvements had to be made later.
Your modifications looks OK, thank you. Although the PR build trigger is missing.

@Test-Automation-Engineer
Copy link
Contributor Author

Test-Automation-Engineer commented Jan 26, 2021

@GewoonMaarten @mjcarsjens
Updated version of @GewoonMaarten
I will delete the other files and create one .yml for build and deploy

on:
  push:
    branches:
      - development
      - master
  pull_request:
    branches:
      - development
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Set up Node.js version
      uses: actions/setup-node@v2
      with:
        node-version: '14.x'

    - name: yarn install, build storybook
      run: |
        npm install -g yarn
        yarn install
        yarn build-storybook

  deploy-staging:
    if: github.ref == 'refs/heads/development'
    runs-on: ubuntu-latest
    steps:
    - name: 'Deploy to Azure Web App'
      uses: azure/webapps-deploy@v2
      with:
        app-name: 'nldsreactstorybook-staging'
        slot-name: 'production'
        publish-profile: ${{ secrets.AzureAppService_Nlds_Staging }}
        package: storybook-static

  deploy-production:
    if: github.ref == 'refs/heads/master'
    runs-on: ubuntu-latest
    steps:
    - name: 'Deploy to Azure Web App'
      uses: azure/webapps-deploy@v2
      with:
        app-name: 'nldsreactstorybook'
        slot-name: 'production'
        publish-profile: ${{ secrets.AzureAppService_Nlds_Prod }}
        package: storybook-static

@Test-Automation-Engineer Test-Automation-Engineer merged commit b1d3996 into development Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants