diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..e7227b2 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,40 @@ +name: Optimize map and deploy + +on: + push: + branches: + - master + +jobs: + + deploy: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Optimize map + uses: thecodingmachine/map-optimizer-action@master + + - name: Bash + run: | + ls -al + git config --global user.email "d.negrier@thecodingmachine.com" + git config --global user.name "David NĂ©grier" + git checkout master + git commit -am "Adding files" + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages # The branch the action should deploy to. + FOLDER: . # The folder the action should deploy. + BASE_BRANCH: master + + - name: Bash2 + run: | + ls -al diff --git a/README.md b/README.md index e2d659e..2dc9998 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ click the **"Use this template"** button. You will be prompted to enter a reposi Be sure to keep the repository "Public". In your newly created repository, click on the **Settings tab** and scroll down to the **GitHub Pages** section. -Then select the **master** branch. +Then select the **gh-pages** branch. ![](docs/github_pages.png) @@ -38,7 +38,7 @@ Your map is now up and online. You need to customize it. ### Cloning the map Start by cloning the map. If you are used to Git and GitHub, simply clone the map -to your computer using your preferred tool and jump to the next chapter. +to your computer using your preferred tool and [jump to the next chapter](#loading-the-map-in-tiled). If you are new to Git, cloning the map means downloading the map to your computer. To do this, you will need Git, or a Git compatible tool. Our advice is to use @@ -74,3 +74,6 @@ Please be sure to check it out. ### Pushing the map When your changes are ready, you need to "commit" and "push" the changes back to GitHub. +Just wait a few minutes, and your map will be propagated automatically to the GitHub pages web-server. + +TODO: describe how to push