Skip to content

Bump tough-cookie from 4.0.0 to 4.1.3 in /starter-templates/ocjs-create-react-app-5 #250

Bump tough-cookie from 4.0.0 to 4.1.3 in /starter-templates/ocjs-create-react-app-5

Bump tough-cookie from 4.0.0 to 4.1.3 in /starter-templates/ocjs-create-react-app-5 #250

name: Deploy website to preview channel on PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Check out repository code
uses: actions/checkout@v2
- name: Add reference docs to website
run: |
cd website/static
gsutil cp gs://opencascade-js/reference-docs.zip .
unzip reference-docs.zip
rm reference-docs.zip
- name: Add starter templates to website
run: |
cd website/static
mkdir download-starter-templates
gsutil cp -r gs://opencascade-js/starter-templates ./download-starter-templates
mv download-starter-templates/starter-templates/* download-starter-templates/
rm -r download-starter-templates/starter-templates
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Generate Docker Staging Tag Name
id: dockerStagingTag
run: |
githubBranch=${{ steps.branch-name.outputs.current_branch }}
tag=$(echo "$githubBranch" | tr '[:upper:]' '[:lower:]')
echo "::set-output name=tag::$tag"
- name: Create custom build
run: |
cd website/ocjs-editor-theme/src/customBuild
docker run --rm \
-v $(pwd):/src \
-u $(id -u):$(id -g) \
${{ secrets.DOCKER_IMAGE_NAME }}:staging-${{ steps.dockerStagingTag.outputs.tag }} \
/src/customBuild.yml
- name: Build website
run: |
cd website
npm ci
cd ocjs-editor-theme
npm ci && npm run build
cd ..
npm run build
npm run disallow-search-bots
- name: Deploy to firebase preview channel
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_OPENCASCADE_JS }}'
projectId: opencascade-js
entryPoint: website
expires: 30d