Skip to content

Commit

Permalink
fix(website): deploy issues (module-federation#896)
Browse files Browse the repository at this point in the history
* fix(website): experiment with netlify gha deploy

* fix(website): changes gh action trigger for testing

* fix(website): added build flag to netlify deploy

* fix(website): skip nextjs plugin env test

* fix(website): test preview deploy action

* fix(website): replace pure cli with official gha

* fix(website): try netlify cli without install

* fix(website): remove testing comments

* fix(website): add comment of preview

* fix(website): always trigger preview for testing

* fix(website): fix cli args issue

* fix(website): fix args issue

* fix(website): use official cli image

* fix(website): fix github token issue

* fix(website): remove check condition for testing

* fix(website): trigger pr action

* fix(website): trye using pull_request_target for comments

* fix(website): trye permissions

* fix(website): remove comment handling
  • Loading branch information
CaioRolla authored May 22, 2023
1 parent 9b4ec04 commit 08db090
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,14 @@ jobs:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: build-${{ hashFiles('**/yarn.lock') }}
- run: npm run build:website
- uses: nwtgck/[email protected]
with:
publish-dir: ./dist/apps/website/client
deploy-message: "Deploy from GitHub Actions"
production-deploy: true
- run: "npx netlify deploy --build --prod --message \"Deploy from GitHub Actions\""
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
NETLIFY_NEXT_PLUGIN_SKIP: true

preview-website:
name: 'Deploy Netlify Preview'
permissions:
contents: write
runs-on: ubuntu-latest
needs: setup
if: ${{ needs.setup.outputs.website-changed == 'true' && github.event_name == 'pull_request' }}
Expand All @@ -78,18 +72,10 @@ jobs:
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: build-${{ hashFiles('**/yarn.lock') }}
- run: npm run build:website
# Sets the branch name as environment variable
- uses: nelonoel/[email protected]
- uses: nwtgck/[email protected]
id: publish-preview
with:
publish-dir: ./dist/apps/website/client
deploy-message: "Deploy Preview from GitHub Actions"
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
alias: ${{ env.BRANCH_NAME }}
- run: npm run build:website
- run: "npx netlify deploy --build --message \"Deploy Preview from GitHub Actions\" --alias \"${{ env.BRANCH_NAME }}\""
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
NETLIFY_NEXT_PLUGIN_SKIP: true

0 comments on commit 08db090

Please sign in to comment.