Skip to content

Commit 10429ba

Browse files
committed
Forward port changes from v0.6 release branch
Starting from this point, documentation will be pushed to doc.atomvm.org repo.
2 parents ec2dba5 + f02d191 commit 10429ba

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

.github/workflows/publish-docs.yaml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ jobs:
9595
- uses: actions/checkout@v4
9696
id: checkout-production
9797
with:
98-
repository: atomvm/atomvm_www
99-
ref: Production
98+
repository: atomvm/doc.atomvm.org
99+
ref: main
100100
path: /home/runner/work/AtomVM/AtomVM/www
101101

102102
- name: Track all branches
@@ -116,21 +116,20 @@ jobs:
116116
cmake ..
117117
cd doc
118118
make GitHub_CI_Publish_Docs
119-
rm -frv "/__w/AtomVM/AtomVM/www/doc/${{ github.ref_name }}"
120-
cp -av html "/__w/AtomVM/AtomVM/www/doc/${{ github.ref_name }}"
119+
rm -frv "/__w/AtomVM/AtomVM/www/${{ github.ref_name }}"
120+
cp -av html "/__w/AtomVM/AtomVM/www/${{ github.ref_name }}"
121121
- name: Commit files
122122
id: commit_files
123123
if: github.repository == 'atomvm/AtomVM'
124124
working-directory: /home/runner/work/AtomVM/AtomVM/www
125125
run: |
126126
git config --local user.email "atomvm-doc-bot@users.noreply.github.com"
127127
git config --local user.name "AtomVM Doc Bot"
128-
ls -la doc/
129-
git status "doc/${{ github.ref_name }}"
130-
git add "doc/${{ github.ref_name }}"
128+
git status "${{ github.ref_name }}"
129+
git add "${{ github.ref_name }}"
131130
git add .
132-
git diff --exit-code Production || echo "Going to commit"
133-
git diff --exit-code Production || git commit -m "Update Documentation for ${{ github.ref_name }}"
131+
git diff --exit-code main || echo "Going to commit"
132+
git diff --exit-code main || git commit -m "Update Documentation for ${{ github.ref_name }}"
134133
git log -1
135134
- name: Push changes
136135
if: github.repository == 'atomvm/AtomVM'
@@ -143,7 +142,7 @@ jobs:
143142
echo "github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" > ~/.ssh/known_hosts
144143
echo "github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=" >> ~/.ssh/known_hosts
145144
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" >> ~/.ssh/known_hosts
146-
git remote add push_dest "git@github.com:atomvm/atomvm_www.git"
145+
git remote add push_dest "git@github.com:atomvm/doc.atomvm.org.git"
147146
git fetch push_dest
148-
git diff --exit-code push_dest/Production || echo "Going to push"
149-
git diff --exit-code push_dest/Production || git push --set-upstream push_dest Production
147+
git diff --exit-code push_dest/main || echo "Going to push"
148+
git diff --exit-code push_dest/main || git push --set-upstream push_dest main

doc/conf.py.in

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ html_css_files = [
148148

149149
html_favicon = '@CMAKE_CURRENT_SOURCE_DIR@/src/_static/favicon/favicon.ico'
150150

151-
html_baseurl = 'https://atomvm.net/doc'
151+
# html_baseurl is used for the Canonical Link Relation
152+
# See also https://datatracker.ietf.org/doc/html/rfc6596.html
153+
html_baseurl = 'https://doc.atomvm.org/main/'
152154

153155
############################
154156
# SETUP THE RTD LOWER-LEFT #
@@ -158,7 +160,7 @@ try:
158160
except NameError:
159161
html_context = dict()
160162

161-
html_baseurl = 'https://atomvm.net/doc'
163+
html_baseurl = 'https://doc.atomvm.org/main/'
162164

163165
html_context['display_lower_left'] = 'True'
164166

@@ -203,12 +205,12 @@ html_context['version'] = current_version
203205
html_context['versions'] = list()
204206
for version in versions:
205207
if ((version) == ('main')):
206-
html_context['versions'].append( (version + ' branch (unstable)', '/doc/' +version+ '/') )
208+
html_context['versions'].append( (version + ' branch (unstable)', '/' +version+ '/') )
207209
else:
208210
if (version not in release_list):
209-
html_context['versions'].append( (version + ' branch (unreleased)', '/doc/' +version+ '/') )
211+
html_context['versions'].append( (version + ' branch (unreleased)', '/' +version+ '/') )
210212
else:
211-
html_context['versions'].append( (version, '/doc/' +version+ '/') )
213+
html_context['versions'].append( (version, '/' +version+ '/') )
212214

213215
html_sidebars = {
214216
'**': [
@@ -218,8 +220,8 @@ html_sidebars = {
218220

219221
# POPULATE LINKS TO OTHER FORMATS/DOWNLOADS
220222
html_context['downloads'] = list()
221-
html_context['downloads'].append( ('pdf', '/doc/' +download_version+ '/pdf/' +project+ '-' +download_version+ '.pdf') )
222-
html_context['downloads'].append( ('epub', '/doc/' +download_version+ '/epub/' +project+ '-' +download_version+ '.epub') )
223+
html_context['downloads'].append( ('pdf', '/' +download_version+ '/pdf/' +project+ '-' +download_version+ '.pdf') )
224+
html_context['downloads'].append( ('epub', '/' +download_version+ '/epub/' +project+ '-' +download_version+ '.epub') )
223225

224226
# -- Options for PDF output -------------------------------------------------
225227

doc/edoc/gendoc.erl.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ main([LibraryName, SrcDir, TgtDir]) ->
3636
{doclet, edown_doclet},
3737
{source_path, ["src"]},
3838
{library, LibraryName},
39-
{LibraryName, "https://atomvm.net/doc/apidocs/erlang/" ++ LibraryName},
39+
% This is used as Canonical Link Relation
40+
% See also: https://datatracker.ietf.org/doc/html/rfc6596.html
41+
{LibraryName, "https://doc.atomvm.org/main/apidocs/erlang/" ++ LibraryName},
4042
{stylesheet, ""},
4143
{image, ""},
4244
{dir, TgtDir}

0 commit comments

Comments
 (0)