Skip to content

Commit

Permalink
Change static.yml and docusaurus.config.ts to try a deploiement of th…
Browse files Browse the repository at this point in the history
…e PR.
  • Loading branch information
HaudinFlorence committed Aug 29, 2024
1 parent 2f19058 commit 43867cd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["fix_alignments_in_mobile_design"]
branches: "*"
pull_request:
branches:
- '*'
- "*"

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages

Expand All @@ -19,6 +19,24 @@ concurrency:
cancel-in-progress: false

jobs:
replace_string:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set environment variable for branch name
env:
BRANCH_NAME: ${{ github.ref_name }}
REPO_NAME: ${{github.repository_name}}

run: echo "Branch name is $BRANCH_NAME"

- name: Replace 'BaseUrl' with branch name in file
run: |
sed -i "s/BaseUrl/${BRANCH_NAME}/g" docusaurus.config.ts
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -38,8 +56,8 @@ jobs:
path: ./build

deploy:
needs: build
if: github.ref == 'refs/heads/fix_alignments_in_mobile_design'
needs: build, replace_string
if: github.ref == 'refs/heads/open_the_popup_portrait_on_a_specific_page'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
4 changes: 2 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const config: Config = {
url: "https://quantstack.net/",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
baseUrl: "/quantstack.github.io/",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "/QuantStack/", // Usually your GitHub org/user name.
organizationName: "/HaudinFlorence/", // Usually your GitHub org/user name.
projectName: "quantstack.github.io", // Usually your repo name.

onBrokenLinks: "throw",
Expand Down
1 change: 1 addition & 0 deletions src/components/projects/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ div .project_title {
/*Desktop*/
.header_container {
margin-top: var(--ifm-spacing-6xl);
background-color: red;
}
.header_title {
padding-left: var(--ifm-spacing-4xl);
Expand Down

0 comments on commit 43867cd

Please sign in to comment.