Skip to content

Commit

Permalink
Merge branch 'master' into sc-43431-metadata-image-path-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
rashidnhm authored Sep 14, 2023
2 parents 0c52731 + 8b8c75c commit f138706
Show file tree
Hide file tree
Showing 169 changed files with 3,196 additions and 73 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/build-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,8 @@ jobs:
skip_sphinx_build_file_aggregation: false
sphinx_build_output_format: json

upload-production:
if: github.ref_name == 'master'
needs:
- build
uses: ./.github/workflows/upload-json.yml
with:
branch: ${{ github.ref }}
aws_s3_bucket_dir: commits/${{ github.ref_name }}-${{ github.sha }}
artifact_name: json.zip
qml_react_webhook_event_type: build-pl-site-main

secrets:
aws_region: ${{ secrets.AWS_REGION }}
aws_access_key_id: ${{ secrets.PL_SITE_PROD_NON_REACT_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.PL_SITE_PROD_NON_REACT_SECRET_ACCESS_KEY }}
aws_json_s3_bucket_id: ${{ secrets.PL_SITE_PROD_QML_JSON_S3_BUCKET_ID }}
aws_html_s3_bucket_id: ${{ secrets.PL_SITE_PROD_S3_BUCKET_NAME }}
qml_react_pat_token: ${{ secrets.PL_SITE_PROD_QML_REACT_PAT }}

upload-staging:
if: github.ref_name == 'dev'
if: github.ref_name == 'master'
needs:
- build
uses: ./.github/workflows/upload-json.yml
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/deploy-demos-to-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy Demos to Production
on:
workflow_dispatch:

jobs:
deploy-demos-to-production:
runs-on: ubuntu-latest

env:
AWS_REGION: ${{ secrets.aws_region }}

steps:
- name: Pull staging bucket
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PL_SITE_STAGING_NON_REACT_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PL_SITE_STAGING_NON_REACT_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET_ID: ${{ secrets.PL_SITE_STAGING_QML_JSON_S3_BUCKET_ID }}
AWS_S3_HTML_BUCKET_ID: ${{ secrets.PL_SITE_STAGING_S3_BUCKET_NAME }}
run: |
aws s3 cp s3://$AWS_S3_BUCKET_ID/master ./local-master
aws s3 cp s3://$AWS_S3_HTML_BUCKET_ID/qml/searchindex.js searchindex.js
- name: Push production bucket
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PL_SITE_PROD_NON_REACT_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PL_SITE_PROD_NON_REACT_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET_ID: ${{ secrets.PL_SITE_PROD_QML_JSON_S3_BUCKET_ID }}
AWS_S3_HTML_BUCKET_ID: ${{ secrets.PL_SITE_PROD_S3_BUCKET_NAME }}
run: |
aws s3 sync ./local-master s3://$AWS_S3_BUCKET_ID/master --delete
aws s3 cp searchindex.js s3://$AWS_S3_HTML_BUCKET_ID/qml/searchindex.js
- name: Trigger production website build
uses: peter-evans/repository-dispatch@v2
env:
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
token: ${{ secrets.PL_SITE_PROD_QML_REACT_PAT }}
repository: XanaduAI/pennylane.ai-react
event-type: build-pl-site-main
client-payload: '{"actor": "${{ github.actor }}", "triggering_actor": "${{ github.triggering_actor }}", "source_run_url": "${{ env.RUN_URL }}"}'
3 changes: 2 additions & 1 deletion .github/workflows/upload-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
AWS_S3_BUCKET_ID: ${{ secrets.aws_json_s3_bucket_id }}
AWS_S3_HTML_BUCKET_ID: ${{ secrets.aws_html_s3_bucket_id }}
AWS_S3_BUCKET_DIR: ${{ inputs.aws_s3_bucket_dir }}

steps:
Expand Down Expand Up @@ -102,7 +103,7 @@ jobs:
run: aws s3 sync s3://$AWS_S3_BUCKET_ID/$AWS_S3_BUCKET_DIR s3://$AWS_S3_BUCKET_ID/${{ steps.branch_name.outputs.name }} --delete

- name: Sync searchindex to HTML Bucket
run: aws s3 cp searchindex.js s3://$AWS_S3_BUCKET_ID/qml/searchindex.js
run: aws s3 cp searchindex.js s3://$AWS_S3_HTML_BUCKET_ID/qml/searchindex.js

trigger-website-build:
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ json-norun:
@echo
@echo "Build finished. The JSON files are in $(BUILDDIR)."

text:
$(SPHINXBUILD) -b text "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo
@echo "Build finished. The text files are in $(BUILDDIR)."

text-norun:
$(SPHINXBUILD) -D plot_gallery=0 -b text "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo
@echo "Build finished. The text files are in $(BUILDDIR)."

download:
# make data directories
mkdir -p $(DATADIR)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ programming](https://en.wikipedia.org/wiki/Differentiable_programming) of quantu

The content consists of three learning hubs and three additional areas:

- Learning hubs:
- Learning hubs:
+ [What is quantum computing?](https://pennylane.ai/qml/what-is-quantum-computing.html) Understand what quantum computers can do and how we can make them do it.
+ [What is quantum machine learning?](https://pennylane.ai/qml/whatisqml.html) Understand what
quantum computing means for machine learning.
Expand Down
Loading

0 comments on commit f138706

Please sign in to comment.