Skip to content

Commit

Permalink
Use master for source code for personal/organization webpages and upd…
Browse files Browse the repository at this point in the history
…ate the document (#344)

Co-authored-by: Neeraj Gangwar <neeraj.gangwar@myntra.com>
  • Loading branch information
neerajgangwar and Neeraj Gangwar committed Jul 17, 2021
1 parent 89efedc commit 4d5f2dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- master
- source
pull_request:
branches:
- master
- source

jobs:
deploy:
Expand Down Expand Up @@ -43,11 +41,7 @@ jobs:
elif [[ ${GITHUB_REF} = refs/heads/* ]]; then # branch, e.g. master, source etc
echo "::set-output name=SRC_BRANCH::${GITHUB_REF#refs/heads/}"
fi
if [[ ${{ github.repository }} = *.github.io ]]; then # user/org repo
echo "::set-output name=DEPLOY_BRANCH::master"
else
echo "::set-output name=DEPLOY_BRANCH::gh-pages"
fi
echo "::set-output name=DEPLOY_BRANCH::gh-pages"
- name: Deploy website
run: yes | bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }}
--src ${{ steps.setup.outputs.SRC_BRANCH }}
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,10 @@ Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0
**For personal and organization webpages:**
- Rename your repository to `<your-github-username>.github.io` or `<your-github-orgname>.github.io`.
- Click on **Actions** tab and **Enable GitHub Actions**; you no need to worry about creating any workflows as everything has already been set for you.
- In the **Settings**, select **Branches** and [rename the branch](https://docs.github.com/en/github/administering-a-repository/renaming-a-branch) with the source code from `master` to `source`. From now on, this will be your default branch. Any changes you make should be committed and pushed to this branch.
- Make sure the `url` and `baseurl` fields in `_config.yml` are empty.
- Make any other changes to your webpage, commit, and push. This will automatically trigger the **Deploy** action.
- Wait for a few minutes and let the action complete. You can see the progress in the **Actions** tab. If completed successfully, in addition to the `source` branch, your repository should now have a newly built `master` branch.
- Finally, again in the **Settings**, in the Pages section, set the branch to `master` (**NOT** to `source`).

**NOTE**: you **must** do all your changes in the `source` branch (the one you used to push) **NOT the master** one; this last one is used for **deploying** by Github Pages and it is not suitable for pushing changes.
- Finally, in the **Settings**, in the Pages section, set the branch to `gh-pages` (**NOT** to `master`).

<details><summary><strong>Manual deployment to GitHub Pages:</strong></summary>

Expand Down

0 comments on commit 4d5f2dc

Please sign in to comment.