# Franklin: how to setup the Deploy.yml file?

**URL:** <https://discourse.julialang.org/t/franklin-how-to-setup-the-deploy-yml-file/115382>\
**Category:** Specific Domains\
**Tags:** franklin\
**Created:** [June 9, 2024, 7:53am UTC](https://discourse.julialang.org/t/franklin-how-to-setup-the-deploy-yml-file/115382 "2024-06-09T07:53:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fmor/32/211337_2.png) [@fmor](https://discourse.julialang.org/u/fmor)\
**Post date:** [June 9, 2024, 7:53am UTC](https://discourse.julialang.org/t/franklin-how-to-setup-the-deploy-yml-file/115382/1 "2024-06-09T07:53:12Z")

</div>

I’m writing since I’m getting complications in deploying my website (hosted with github pages) with Franklin.  
I’m in the classical situation where locally using `serve()` all works fine, but not when going online, where the deployment doesn’t work at all or when it works (since I’m trying different configurations, copying the ones from other Franklin sites repositories) the css file gets not loaded. In config.md I set `prepath=""` so that is not the problem.

This is my repository [https://github.com/federicomor/federicomor.github.io/tree/main](https://github.com/federicomor/federicomor.github.io/tree/main), corresponding to the site [https://federicomor.github.io/](https://federicomor.github.io/) and for wandering around repositories the current deployment file is this one:

```julia
name: Build and Deploy
on:
  push:
    branches:
      - main
      - master
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
        persist-credentials: false
    # NOTE: Python is necessary for the pre-rendering (minification) step
    - name: Install python
      uses: actions/setup-python@v2
      with:
        python-version: '3.8'
    # NOTE: Here you can install dependencies such as matplotlib if you use
    # packages such as PyPlot.
    # - run: pip install matplotlib
    - name: Install Julia
      uses: julia-actions/setup-julia@v1
      with:
        version: '1' # Latest stable Julia release.
    # NOTE
    # The steps below ensure that NodeJS and Franklin are loaded then it
    # installs highlight.js which is needed for the prerendering step
    # (code highlighting + katex prerendering).
    # Then the environment is activated and instantiated to install all
    # Julia packages which may be required to successfully build your site.
    # The last line should be `optimize()` though you may want to give it
    # specific arguments, see the documentation or ?optimize in the REPL.
    - run: julia -e '
            using Pkg; Pkg.add(["NodeJS", "Franklin"]);
            using NodeJS; run(`$(npm_cmd()) install highlight.js`);
            using Franklin;
            Pkg.activate("."); Pkg.instantiate();
            optimize()'
    - name: Build and Deploy
      uses: JamesIves/github-pages-deploy-action@releases/v3
      with:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        BRANCH: gh-pages
        FOLDER: __site

```

But when I push new changes I get this error:

```julia
GitHub Pages Deploy Action 🚀
[...]
fatal: unable to access 'https://github.com/federicomor/federicomor.github.io.git/': The requested URL returned error: 403
Running post deployment cleanup jobs… 🗑️
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Deployment failed! ❌

```

So I’m quite sure that the error is in how I wrote the Deploy.yml file, but I did not understand how to properly setup it.

> UPDATE/Solution  
> In the end it worked that deployment file, but in my repository I had to go to Settings, Pages, and change it in this way:  
> ![image](https://global.discourse-cdn.com/julialang/original/3X/2/a/2a5d3c676f49313a450bbae3249c48714b3daa97.png)  
> I did not see this advice written in any of the Franklin documentation (maybe it was obvious?), so I will keep this post if anyone else will need it.
