diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c652f4b..d02261a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,84 +29,3 @@ jobs: run: | composer install composer test - deploy-staging: - needs: test - if: github.ref == 'refs/heads/dev' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@platform-coop-toolkit' - - name: Cache node modules - uses: actions/cache@v1 - with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} - - name: npm install and build - run: | - npm install - npm run build:production - env: - NODE_AUTH_TOKEN: ${{ secrets.PKG_READ_TOKEN }} - CI: true - - name: Cache Composer packages - uses: actions/cache@v1 - with: - path: vendor - key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} - - name: Composer install - run: composer install --no-dev --optimize-autoloader - - name: Deploy to staging - id: deploy - uses: platform-coop-toolkit/rsync-deploy@master - env: - DEPLOY_KEY: ${{secrets.DEPLOY_KEY}} - with: - flags: "-azrh --delete --progress --exclude-from '.distignore'" - port: '22222' - dest: 'platformcoop@ctweb12.ct.coop:/home/platformcoop/domains/stage.commons.platform.coop/public_html/wp-content/themes/coop-library' - - name: Display status from deploy - run: echo "${{ steps.deploy.outputs.status }}" - deploy-production: - needs: test - if: github.ref == 'refs/heads/master' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@platform-coop-toolkit' - - name: Cache node modules - uses: actions/cache@v1 - with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} - - name: npm install and build - run: | - npm install - npm run build:production - env: - CI: true - - name: Cache Composer packages - uses: actions/cache@v1 - with: - path: vendor - key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} - - name: Composer install - run: composer install --no-dev --optimize-autoloader - - name: Deploy to production - id: deploy - uses: platform-coop-toolkit/rsync-deploy@master - env: - DEPLOY_KEY: ${{secrets.DEPLOY_KEY}} - with: - flags: "-azrh --delete --progress --exclude-from '.distignore'" - port: '22222' - dest: 'platformcoop@ctweb12.ct.coop:/home/platformcoop/domains/resources.platform.coop/public_html/wp-content/themes/coop-library' - - name: Display status from deploy - run: echo "${{ steps.deploy.outputs.status }}"