diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 00000000..a9db4a4b --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,39 @@ +name: Jekyll site CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the site in a container + run: | + docker run \ + -v ${{ github.workspace }}:/srv/jekyll \ + --entrypoint '' \ + huli/gulp /bin/bash -c "cd /srv/jekyll && gem install -g && npm install && gulp build:full" + - name: Prepare the deployment package + run: | + zip -r dev-opera.zip appspec.yml dest + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + - name: Create AWS CodeDeploy deployment + uses: sourcetoad/aws-codedeploy-action@v1.3.0 + with: + aws_region: us-west-2 + s3_bucket: dev-opera + s3_folder: latest + archive: dev-opera.zip + codedeploy_name: DevOpera + codedeploy_group: MainBackends diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e7686320..00000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -dist: bionic -language: ruby -rvm: -- 2.2 -install: - - "bundle install --jobs=3 --retry=3" - - "nvm install" - - "node --version" - - "npm --version" - - "npm install" -script: "travis_wait node_modules/.bin/gulp build:full" -before_deploy: - - mkdir _codedeploy - - tar czf _codedeploy/dev-opera.tar.gz appspec.yml dest -after_deploy: - - rm -rf _codedeploy -deploy: - - provider: s3 - region: us-west-2 - access_key_id: "AKIAILZS2G2NCXNE4U2A" - secret_access_key: - secure: "AuuSW98B2/0cVv/qKwGCBujfIB7bIgtfySVZKZ2yiG06I0AJwQawpaPcI92hMjZ6aTtFD2SdhshDlcUdh7BNsMoJzs4SQIRukCnikvoYsWR2+3FDFwffLj7ijFyreAIHbq9ydcB0I/x/a2A3grNEtvgURydurxow+f7IWfn8GmA=" - local_dir: _codedeploy - bucket: dev-opera - upload-dir: latest - skip_cleanup: true - - - provider: codedeploy - region: us-west-2 - access_key_id: "AKIAILZS2G2NCXNE4U2A" - secret_access_key: - secure: "AuuSW98B2/0cVv/qKwGCBujfIB7bIgtfySVZKZ2yiG06I0AJwQawpaPcI92hMjZ6aTtFD2SdhshDlcUdh7BNsMoJzs4SQIRukCnikvoYsWR2+3FDFwffLj7ijFyreAIHbq9ydcB0I/x/a2A3grNEtvgURydurxow+f7IWfn8GmA=" - application: DevOpera - deployment_group: MainBackends - bucket: dev-opera - key: latest/dev-opera.tar.gz - bundle_type: tgz -git: - depth: 1 -branches: - only: - - master diff --git a/appspec.yml b/appspec.yml index 49a87c03..57ceb17e 100644 --- a/appspec.yml +++ b/appspec.yml @@ -5,3 +5,13 @@ os: linux files: - source: dest destination: /var/www/html + +branch_config: + master: + deploymentGroupName: MainBackends + deploymentConfig: + revision: + s3Location: + bucket: dev-opera + bundleType: tgz + key: latest/dev-opera.tar.gz